﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;

namespace MultiBindingConverter
{
    public class CaseConverter : IMultiValueConverter
    {
        //public static DependencyProperty myParameterProperty = DependencyProperty.Register(
        //    "CaseParameter",
        //    typeof(bool),
        //    typeof(CaseConverter));

        //public bool CaseParameter
        //{
        //    get { return (bool)GetValue(myParameterProperty); }
        //    set { SetValue(myParameterProperty, value);}
        //}


        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string text = (string)values[0];
            bool isUpperCase = (bool)values[1];

            return isUpperCase ? text.ToUpper() : text;

        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
